
/*
 * [Ronny Abraham]
 * [ronnya@gmail.com]
 * CS530:DUI, Assignment [#1]
 */

public class Actor {
	
	/*
	 * default ctr, assigns default values
	 */
	Actor(){
		Integer counter = new Integer(++actorCounter);
		name = "actor-" + counter.toString();
		expression = defaultExpression;
		shirtColor = defaultShirtColor;
		pantsColor = defaultPantsColor;
		width = defaultWidth;
		height = defaultHeight;
	}
	
	Actor(String name, Expression expression, ClothesColor shirtColor, ClothesColor pantsColor, int width, int height){
		this.name = name;
		this.expression = expression;
		this.shirtColor = shirtColor;
		this.pantsColor = pantsColor;
		this.width = width;
		this.height = height;
	}

	public Actor(Actor other)
	{
		this.name = new String(other.name);
		this.expression = other.expression;
		this.shirtColor = other.shirtColor;
		this.pantsColor = other.pantsColor;
		this.width = other.width;
		this.height = other.height;
	}

	public void copyFrom(Actor other)
	{
		name = other.name;
		expression = other.expression;
		shirtColor = other.shirtColor;
		pantsColor = other.pantsColor;
		width = other.width;
		height = other.height;
	}
	public String getValueAt(int i){
		String retval = new String();
		
		if(i == 0) retval = name;
		else if (i == 1) retval = expression.toString();
		else if (i == 2) retval = shirtColor.toString();
		else if (i == 3) retval = pantsColor.toString();
		else if (i == 4) retval = new Integer(width).toString();
		else if (i == 5) retval = new Integer(height).toString();
		
		return retval;
	}
	
	public String name;
	public Expression expression;
	public ClothesColor shirtColor, pantsColor;
	public int width, height;
	
	// default values
	private static Expression defaultExpression = Expression.happy;
	private static ClothesColor defaultShirtColor = ClothesColor.blue;
	private static ClothesColor defaultPantsColor = ClothesColor.yellow;
	public static int defaultWidth = 100;
	public static int defaultHeight = 150;
	private static int actorCounter = 0;
}
